﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NetChatInterface
{
    public partial class QuickAddFriend : Form
    {
        IntPtr handle;//for main window
        public QuickAddFriend(IntPtr handle)
        {
            this.handle = handle;
            InitializeComponent();
        }

        private void addFriendButton_Click(object sender, EventArgs e)
        {
            MessageImport.PostMessage(
                handle,
                MessageType.MSG_ADDFRI,
                0,
                Marshal.StringToHGlobalAnsi(IPAddress.Text));
            
        }

        private void QuickAddFriend_Load(object sender, EventArgs e)
        {

        }
    }
}
